home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Programming / AMOSList / AMOSLIST / text0058.txt < prev    next >
Encoding:
Text File  |  1998-04-01  |  1.3 KB  |  35 lines

  1. Hello,
  2.  
  3. Here's a little trick I found the other day, hope somebody can use it..
  4.  
  5. To store an integer-array you would normaly open a sequentiel file and dump
  6. the data with a loop.. Well try this instead:
  7. MX=50
  8. Dim A(MX)
  9. -
  10. Bsave FILE$,Varptr(A(0)) To Varptr(A(0))+(MX+1)*4
  11.  
  12. And to reload:
  13. Bload FILE$,Varptr(A(0))
  14.  
  15. You can simply replace Bsave with Ssave if you'd like to have more than one
  16. Array in a file. Or use Copy to put in a bank :)
  17.  
  18. -- 
  19. Kind regards from
  20. ______________________________________________________________________________
  21.  /_  __/ __  / __  /\  ___\  __ \__  _\               aka. JENS VANG PETERSEN
  22.   / / / /_/ / ____/  \ \___\  __ \ \ \                  top_cat@post8.tele.dk
  23.  /_/ /_____/_/        \_____\_\ \_\ \_\
  24. ------------------------------------------------------------------------------
  25.                     http://home8.inet.tele.dk/top_cat/
  26.   -+-    Home of 'The Ultimate Extension list' for AMOS TC & AMOS PRO    -+-
  27.                  -+-  SUPPORT - AMOS - AMIGA - AQUA  -+-
  28. ------------------------------------------------------------------------------
  29.  It is better to have tried and failed than to have  failed  to  try, but the
  30.  result's the same.
  31.                                                              -- Mike Dennison
  32. ------------------------------------------------------------------------------
  33.  
  34.  
  35.